package org.example.springioc.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.List;
import java.util.Map;


@Configuration
@ConfigurationProperties(prefix ="student")
@Data
public class StudentConfig {

    private Integer id;
    private String name;
    private Integer age;
    private List<String> dbtype;
    private Map<String,String> map;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public List<String> getDbtype() {
        return dbtype;
    }

    public void setDbtype(List<String> dbtype) {
        this.dbtype = dbtype;
    }

    public Map<String, String> getMap() {
        return map;
    }

    public void setMap(Map<String, String> map) {
        this.map = map;
    }

    @Override
    public String toString() {
        return "StudentConfig{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", dbtype=" + dbtype +
                ", map=" + map +
                '}';
    }
}
